<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
  </head>
  <body>
    <script>
      function cal(num1, num2, fn) {
        return fn(num1, num2);
      }
      console.log(cal(45, 55, function (a, b) {
        return a + b;
      }));
      console.log(cal(10, 20, function (a, b) {
        return a * b;
      }));
    </script>
  </body>
</html>